<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
            <h4 class="modal-title">优惠券</h4>
        </div>
        <div class="modal-body">
            <table id="data-grid" class="table"></table>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
    </div>
</div>
<script type="text/javascript">
    $('#data-grid').bootstrapTable({
        method: "get",//请求方式
        url: "/admin/member/getMemberCouponList?memberId=${memberId!}",//数据源
        uniqueId: "memberCouponId",
        dataField: "list",
        pagination: true,//是否分页
        clickToSelect: true,
        singleSelect: true,
        sidePagination: "server",//服务端分页
        queryParamsType: "",
        columns: [
            {
                title: "优惠券名称",
                field: "couponName"
            },
            {
                title: "优惠券面值",
                field: "money",
                formatter: function (val) {
                    return val + "元";
                }
            },
            {
                title: "使用条件",
                field: "needMoney",
                formatter: function (val) {
                    if (val === 0) {
                        return "无门槛";
                    } else {
                        return "满" + val + "元可用";
                    }
                }
            },
            {
                title: "状态",
                field: "statusS"
            },
            {
                title: "领取时间",
                field: "createTime"
            }
        ]
    });
</script>